package com.bba.manager.gateway.util;

import lombok.Getter;

@Getter
public enum ResponseEnum {
    /* 成功状态码 */
    SUCCESS(2000, "操作成功"),
    /* 错误状态码 */
    FAIL(1000, "操作失败"),
    /* 参数错误：1001-1999 */
    PARAM_IS_INVALID(1001, "参数无效"),
    PARAM_IS_VALID(1002,"参数检验错误"),
    PARAM_TYPE_BIND_ERROR(1003, "参数格式错误"),
    /* 用户错误：2001-2999*/
    USER_NOT_LOGGED_IN(2001, "用户未登录，请先登录"),
    USER_ACCOUNT_FORBIDDEN(2002, "账号不存在或员工已离职"),
    USER_PASSWORD_ERROR(2003, "密码错误"),
    USER_HAS_EXISTED(2004, "用户已存在"),
    PLEASE_INPUT_USERNAME(2005,"请输入用户名"),
    /* 权限错误：3001-3999 */
    PERMISSION_UNAUTHORIZED(3001, "权限不足，无权操作"),
    PERMISSION_EXPIRE(3002, "登录状态过期！"),
    PERMISSION_TOKEN_EXPIRED(3003, "token已过期"),
    /*商品错误4001-4999*/
    STOCK_NO_MANY_NUMBER(4001,"库存不足"),
    STOCK_DELETED_SUCCESS(4002,"删除成功"),
    THE_USER_HAS_NAO_PURCHASE_HISTORY(4003,"该用户没有购买历史"),
    SERVICE_CIRUIT_BREAKER(5001,"服务熔断");




    private final int code;// 状态码
    private final String message; // 提示信息
    private ResponseEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
